AmigaSoc UK
H o w     T o

First steps with archivers

Undoubtedly on your travels through many a mystery FTP site, you'll come across a file that you cannot decompress however hard you try. After all, what exactly is a .tgz file ? And how the hell do you break it open ? To make things easier, I have compiled a list of archivers I have come across on my travels through the Internet and listed them below together with the necessary software for manipulating them. In brackets, alongside each name I have provided some of the most common extensions (ie. .lha, .lzx etc.) associated with such files in order to help you identify them. If you're still in doubt, get hold of Directory Opus 5 and BZ Filetypes. This collection of filetypes should make it very easy to identify any files you are unsure of. Finally, bear in mind that all of the command line options shown here are case-sensitive, so don't mix them up!

Some small tips
I suggest that you copy all archives that you attempt to extract or create to RAM:. This is primarily because some software I have tested is far from perfect and may end up crashing your machine in the middle of a write. If this happens, chances are, you'll corrupt your hard drive, and it'll take you ages to fix it. In cases where you don't have enough RAM:, copy files to either an empty or non-essential (ie. something other than the boot partition) partition, preferably into a new directory so you can see what you've extracted or created. If you have access to a removable cartridge-based device such as an EZ, Zip, Jaz or SyJet drive, then use these instead.

Getting started
If this is one of your first stops on the Internet, you might not be completely aware of what exactly Lha is and how to get hold of it. Lha is necessary to obtain all but a few of the archivers listed here. It is probably the most essential tool you can get your hands on as the vast majority of software on Aminet is compressed using this program. If you don't already have it lurking on a coverdisc somewhere, you are strongly advised to get it right now!

Start by getting hold of the program, by clicking here. The best thing to do is to format a Double Density (it must be Double Density as the majority of Amigas still have such drives) disc on either your Amiga, a PC or a Macintosh as MS-DOS format. Save the file onto this disc and take it home. Assuming you've got CrossDOS installed, you'll be able to read the file off the disc and copy it onto your system. The best idea would be to copy the file into RAM: (to do this, you can open a Shell window and enter:

Copy PC0:#? Ram:
CD Ram:
LhA_e138.run

Now, you'll be presented with a big "Lha" logo and asked whether you want to continue. Press "Y" then return, then "N" followed by return, and finally "Y" and then return. The Lha program is now in the RAM disc. To make sure you have a copy permanently on hand, you can do this...

Copy Lha C:

However, if you don't have a hard drive, be warned that you are unlikely to have enough room on your floppy disc for this file, and so you'd have to remove some others in order to make use of it. We at AmigaSoc strongly recommend that you invest in a hard drive. There ought to be no room for excuses as drives are now exceptionally cheap!

Archiving software
The simplest way of describing an archiver is a program that merges several individual files into one. This is useful for storing program packages on FTP sites as it is more convenient to download a group of files in one go, rather than having to download the program, then the documentation, then examples and so on. The majority of archivers include some form of compression (see below) to reduce the size of resultant files, but there are a few that do not.

Lha (.lha/.lzh)
Get It! (Version 1.38)
Lha is far from new, but it has firmly established itself as the standard Amiga archiving package. It is used to compress nearly all files uploaded onto Aminet, and is also free (or at least, nearly so). The program has since ceased development, but fortunately, the author left the program in a very stable and reliable state (sometimes in contrast to LZX, as described below). The Lha compression routines are freely distributable and so versions of the software exist for other platforms. This alone makes it a good choice for Aminet, as the maintainers are able to check to see if Lha archives uploaded to Aminet are corrupted or not (and also for virus checking purposes).

Lha's command line options are generally quite logical, and are easily picked up. In time, you'll remember all the options you use regularly.

Operation Command line
Archive lha -r -x a {Archive name} {Directory}
List lha lv {Archive name}
Extract lha x {Archive name}
Test lha t {Archive name}

LZX (.lzx)
Get It! (Version 1.21)
For a while, this program was tipped to be the next big thing after Lha to establish an archiving standard. However, due to the fact that the authors of LZX (and pioneers of a new compression scheme) then managed to sell their idea to a company (some say it was MicroSoft), further development ceased. Versions for other platforms never appeared (although there was supposed to be a PC version lurking around somewhere), and so as a standard on Aminet, Lha held on to it's title. LZX boasts the smallest archives and the fastest compression and decompression times. However, there appear to be some bugs in the LZX compression method in that certain patterns within files cannot be properly compressed and always end up generating a corrupted file once extracted. This is a very serious problem, but fortunately only seems to have occurred very rarely. Nevertheless, LZX remains the archiver of choice for many Amigans. Like Lha, it's shareware, but you'd be insane to register either this or Lha seeing as there is no more development on either package.

LZX created quite a stir when it arrived with it's superior compression techniques, and inspired many ideas based around LZX compression (albeit using the actual LZX archiver, not the compression routine directly). Someone tried to create a rather clumsy replacement for DMS (see below) called "Disksqueeze" which was based around LZX compression. It failed to take off primarily as it was not implemented as a one-step solution. It therefore lacked many of the features that DMS has.

In terms of use, you ought to find that LZX bears more than a passing resemblance to Lha in terms of command structure. Incontrovertibly, this also contributed to it's easy integration into the Amiga community. When archiving files with LZX, you are strongly recommended to run a test on the archive you have just created. This is because some rare patterns in files will be compressed incorrectly and will generate errors, thus making you lose the data forever.

Operation Command line
Archive lzx -r -x a {Archive name} {Directory}
List lzx lv {Archive name}
Extract lzx x {Archive name}
Test lzx t {Archive name}

PKZip (.zip)
Get It! (Version 5.31)
This is the defacto standard compression program on the PC. Like all "standard" software on the PC, it comes with a price tag. PKZip is a completely commercial package, therefore the actual compression format is a closely-guarded secret and so other platforms (including the Amiga) can only extract Zip files, but not create them. Although the program is generally quite good, I have noticed that there are some more obscure zipped files that cannot be extracted with this software. Fortunately, this does not appear to be a common problem.

Operation Command line
Archive N/A
Extract unzip -x {Archive name}
List unzip -l {Archive name}
Test unzip -t {Archive name}

ARJ (.arj)
Get It! (Version 2.41)
This is a fairly popular archiver for the PC. I'm reliably informed that ARJ is more efficient than most other offerings on the PC, but as PKZip is the defacto standard, people end up using that instead. The Amiga version is extract only, so you can't create your own ARJ files.

Operation Command line
Archive N/A
Extract unarj e {Archive name}
List unarj l {Archive name}
Test unarj t {Archive name}

Tar (.tar)
Get It! (Version 1.11.2 / Amiga Version 1.5)
Tar is an interesting program. Although it is an archiver, it does not actually compress the data it archives. In fact, it is little more than straight concatenation of files. It was originally designed as a system for backing up files onto magnetic tape (hence the linear nature of the format). It is most common in UNIX variants, and is generally the format of choice for distributing UNIX software. Tar doesn't include any form of error checking, although as Tar files are usually compressed by a separate compression program (see below), such features are handled by the compressor.

Tar files are usually found on FTP sites compressed with either GZip (resulting in files ending in ".tar.gz" or ".tgz") or Compress (files end in ".tar.Z"). Both of these programs are described later. If you have a relatively modern version of Tar, you can decompress a GZipped Tar file in one go by entering "tar zxvf {Archive Name}" and a Compressed Tar file with "tar Zxvf {Archive Name}".

Operation Command line
Archive tar rvf {Archive name} {Directory}
List tar tvf {Archive name}
Extract tar xvf {Archive name}
Test N/A

Stuff It (.sit)
Get It! (Version 1.5c2)
StuffIt is the standard Macintosh Compression tool. Like the PC, StuffIt is a commercial product, extorting nearly �80 from innocent Mac users for retail purchase. Again, this means that the compression code is kept under lock and key so only decompression is possible. However, caution is advised as the Macintosh deals with files in a way which every other computer considers alien. In short, files are split into two sections, of which only the "Data" section could possibly be of use to an Amiga (or indeed any other computer) in a raw state. If you are grabbing software for an emulator such as ShapeShifter, you are best advised to decompress the files under emulation rather than on the Amiga side.

Operation Command line
Archive N/A
List unsit -l {Archive name}
Extract unsit -d {Archive name}
Test N/A

Arc (.arc)
Get It! (Version 0.23)
Arc was one of the original Amiga archiving programs. It was certainly the first program of it's type I ever came across all those years ago. It is now totally obsolete and so it is unlikely that you'd ever find an archive on a BBS or FTP site that is compressed with it. Anyone who has files that are still compressed in this way ought to be shot! Although, surprisingly the program is still stable on newer processors including the 060, Arc does not like file names and paths that exceed around 20 characters which is pretty pointless if you're archiving many directories worth of files.

Operation Command line
Archive arc a {Archive name} {Directory}
List arc v {Archive name}
Extract arc x {Archive name}
Test arc t {Archive name}

Zoo (.zoo)
Get It! (Version 2.10)
Zoo is another exceedingly old archiver. Quite why it was called Zoo still remains a mystery, but I'm sure the programmer had a sense of humour... even if it did leave a little to be desired. Again, you'd be hard pressed to find files archived in this way on the Internet... but you never know! Strangely enough, I was unable to find a way of testing the integrity of the archive.

Operation Command line
Archive zoo2-10 a {Archive name} {Directory}
List zoo2-10 v {Archive name}
Extract zoo2-10 x {Archive name}
Test N/A

Rar (.rar)
Get It! (Version 2.02)
Rar is not a format I have ever come across before now. In fact, I only heard about it recently when someone asked me if I knew how to decompress such archives. I didn't. Now I do!

Operation Command line
Archive N/A
List unrar v {Archive name}
Extract unrar x {Archive name}
Test unrar t {Archive name}

DMS (.dms)
Get It! (Version 1.11)
This is a track-based archiver designed to compress entire discs, a track at a time. This is useful because demos tend to store their data in a very non-standard way which defeats conventional archivers. You'll find .dms files on many FTP sites which contain demos (such as Funet in Finland). DMS is generally frowned upon as it is very easy to wrap viruses into archives in order to make them difficult to detect. Aminet has long since banned such files for this and other reasons.

Getting hold of DMS is easy. Download the archive, copy the file dms111.run to RAM: and just run the program "dms111.run" to extract the archive. The main program, "DMS" will then be extracted into RAM:. You can then copy it to your C: directory for permanent access.

Operation Command line
Archive dms read {Archive name} from {Device}
List N/A
Extract dms write {Archive name} to {Device}
Test dms test {Archive name}

Compression software
Compressors are, as the name implies programs which attempt to reduce the size of individual files (rather than groups of files). This is usually achieved by searching for repeating patterns of bytes, and replacing them with smaller-sized "abbreviations". The beginning of the file contains a conversion table which allows the program to convert abbreviations back into their expanded form for decompression. These programs are necessary for use with archivers such as Tar which do not actually perform any compression when files are added.

GZip (.gz)
Get It! (Version 1.2.4 RESPIN 2)
GZip is primarily used for UNIX software (usually for compressing Tar archives), although you'll find that software on Mac FTP sites can be compressed in this way (BinHex files are generally compressed with it).

It should be noted that GZip has proved to be a bit unstable at time. On several occasions it has crashed my machine in the middle of a write and caused some pretty nasty corruption. Be warned!

Operation Command line
Archive ?
Extract gzip -d -v {Archive name}
List gzip -v -l {Archive name}
Test gzip -v -t {Archive name}

UNIX Compress (.Z)
Get It! (Version 4.0)
Compress is also common in UNIX (standard issue, in fact). This too can be used to compress Tar archives.

Operation Command line
Archive compress -V {Archive name}
List N/A
Extract compress -V -d {Archive name}
Test N/A

Unsupported formats
The archivers and compressors described here ought to get you through the vast majority (if not all) formats you'll find around the Internet. There is only one program that I have yet to see an Amiga decompressor for. The program in question is Compact Pro (shareware) on the Macintosh (files end in .cpt or .sea). However, I should point out that I have never found files on the Internet actually compressed in this format, as everyone uses StuffIt. It's simply a matter of running it under ShapeShifter.

Making things easy
It's possible to get your hands on various programs that provide a more intuitive interface to archiving, listing and extracting various formats of archive. There are several to choose from, although Archiver V2.3 appears to be both easy to use and comprehensive. However, it is shareware. It also requires MUI. Most programs such as this one will assume that you have the archivers they support already installed, but some programmers have been thoughtful enough to actually include the archivers as well.

If you're smart enough to have bought Directory Opus 5, then you'll be able to use Edmund Vermeulen's excellent ArcDir which completely removes all of the complicated command line operations required for dealing with Lha and LZX archives. It deals with archives in a very intuitive way by listing files and directories in a lister so that they may be manipulated using Opus's usual tools.

If, on the other hand, you don't have Opus, you can get hold of ARC Handler. This presents archives in a similar way to ArcDir (except that it only supports Lha archives, and not LZX). The bonus with this program is that it will work in every application, whereas ArcDir is only accessible via Opus. ARC Handler is also used on Aminet CDs in order to make indexing pictures more intuitive.

Encoding software
Encoding software is required for sending files via E-Mail. You will mostly find that modern E-Mail software has encoding routines built in, but older software and some text-only UNIX-derived programs do not. Therefore, if you have an E-Mail program such as YAM then you'll have the ability to embed and extract files without the need for the utilities described here.

UUEncode (.uue)
Get It! (Version 36.6)
UUEncoding is the simplest and at one point the most common way of getting non-text files across the Internet via E-Mail. It's primarily based around UNIX, although it is completely compatible with every other platform. The routines are completely free and so there are a number of programs you can get your hands on to get the job done. "UUCode" is a good example. It contains two programs: one to encode (uuencode) and one to decode (uudecode). Like most systems, UUEncoding is such that you don't actually need to strip away the rest of the E-Mail in case it contains other messages alongside the actual file. The program picks this out already.

Operation Command line
Encode uuencode FROM {file to encode} TO {encoded output name}
Decode uudecode {encoded file}

BinHex (.hqx)
Get It! (Version 37.4)
BinHex is a UUEncode-like format designed for coping with Mac files (which are generally a special case in computing terms). This enables Mac users to send various files (including programs) via E-Mail to each other. If you need to deal with such files for use with a Mac emulator like ShapeShifter, you are better off performing the decoding under emulation so that you don't lose any portion of the file (as part of the file is generally considered useless by other computers as that portion is Mac-specific).

Operation Command line
Encode bhe DATA {file to encode} {encoded output name}
Decode bhd DATA {name for decoded file} {name of encoded file}

Base 64
Get It! (Version 1.2)
Base 64 (used for encoding MIMEd binaries) is a standard format, and appears to be the most popular. It is supported by most modern E-Mail packages, and does a pretty similar job to UUEncode. If your E-Mail program doesn't directly support Base 64, you can use the package above together with ARexx scripts and so on in order to achieve this.

Operation Command line
Encode Base64encode FROM {file to encode} TO {encoded output name}
Decode Base64decode FROM {name of encoded file} TO {name for decoded file}

Support on other platforms
Lha is widely supported on other platforms for both archiving and extracting. You can get the Mac version, but be aware that the program is very badly written and clumsy to use. It also contains Mac-specific extensions which may well confuse the Amiga version, so be careful when bringing files back to an Amiga (make sure you uncheck the "MacBinary" box). You can also get the UNIX source code which can be compiled relatively easily for various flavours of UNIX. I've certainly had minimal trouble preparing a SunOS version. A PC version is also available.

There is supposed to be PC version of LZX lurking around somewhere, but like anything else free on the PC, you'd have a job finding it. Arc and Zoo are supported elsewhere, but again it would take some searching to get hold of them.

If you're looking around at FTP sites meant for other platforms, be aware that Mac FTP sites are pretty cumbersome as obtaining files from them is generally a three stage process. First, decompress the GZip archive, then decode the BinHex, and finally unstuff it. UNIX FTP sites aren't exactly a picnic either as files are usually archived with Tar and compressed with either GZip or Compress. Newer versions of Tar can automatically decompress such files in one sweep which makes this much nicer to deal with.

Hopefully, this brief tour of archivers, compressors and encoders should make your trips around the Internet a little more enjoyable. There have been many times in the past when I had no idea how to get at files inside a particular archive because I didn't know how it had been archived. This guide ought to make sure the same doesn't happen to you!